package com.lvmama.client.rhino;

import java.util.List;
import java.util.Map;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.github.pagehelper.PageInfo;
import com.lvmama.common.result.Result;
import com.lvmama.pojo.dto.rhino.topic.SpecialTopicDTO;
import com.lvmama.pojo.entity.rhino.topic.PitPV;
import com.lvmama.pojo.entity.rhino.topic.SpecialTopicFunnelData;
import com.lvmama.pojo.entity.rhino.topic.TopicFunnelDataQuery;

@FeignClient("rhino-web-service")
@RequestMapping("${server.servlet.context-path}")
public interface TopicClient {


    @RequestMapping(value = "/specialTopic/topicAjaxData" , method = RequestMethod.POST)
    Result<Map<String, Object>> topicAjaxData(@RequestBody SpecialTopicDTO specialTopicDTO);

    @RequestMapping(value = "/specialTopic/topicClickAll", method = RequestMethod.POST)
    @ResponseBody
    Result<Map<String, PageInfo<PitPV>>> getTopicClickAll(@RequestBody SpecialTopicDTO specialTopicDTO);

    @RequestMapping(value = "/specialTopic/topicClickData", method = RequestMethod.POST)
    @ResponseBody
    Result<Map<String, Object>> getTopicClickData(@RequestBody SpecialTopicDTO specialTopicDTO);

    @RequestMapping(value ="/specialTopic/chartData", method = RequestMethod.POST)
    @ResponseBody
    Result<Map<String, Object>> chartData(@RequestBody SpecialTopicDTO specialTopicDTO);

    @RequestMapping(value = "/specialTopic/getPageChartData", method = RequestMethod.POST)
    @ResponseBody
    Result<Map<String, Object>> getPageChartData(@RequestBody SpecialTopicDTO specialTopicDTO);

    /**
     * 查询专题漏斗数据
     *
     * @param query
     * @return
     */
    @RequestMapping(value = "/specialTopic/getTopicFunnel", method = RequestMethod.POST)
    @ResponseBody
    Result<List<SpecialTopicFunnelData>> getTopicFunnel(@RequestBody TopicFunnelDataQuery query);


}
